package com.filmbooks.base;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.filmbooks.widgets.RvLoadMoreView;

import java.util.List;

/**
 * Created by heshuxiang on 2018/3/1.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/3/1.
 * 工程：FilmBooks
 * 包：com.filmbooks.base
 */

public abstract class BaseCompatAdapter<T, K extends BaseViewHolder> extends BaseQuickAdapter<T, K> {
    public BaseCompatAdapter(@LayoutRes int layoutResId, @Nullable List<T> data) {
        super(layoutResId, data);
        init();
    }

    private void init() {
        setLoadMoreView(new RvLoadMoreView());
        setEnableLoadMore(true);
        openLoadAnimation();
    }

    public BaseCompatAdapter(@Nullable List<T> data) {
        super(data);
        init();
    }

    public BaseCompatAdapter(@LayoutRes int layoutResId) {
        super(layoutResId);
        init();
    }
}
